﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> 测试Function标签 </title>
<link rel="stylesheet" type="text/css" href="http://news.cnblogs.com/common/screen_base.css" />
</head>
<body>
 <div class="side_block">
    <h3 class="title_blue">相关新闻</h3>
    <ul class="topnews block_list bt">
    <vt:function var="#.newsdata" method="GetNewsData" type="$this" dbtype="relating" />
    <vt:foreach from="$#.newsdata" item="news" index="i">
    <!--vt[调用自定义函数取得新闻的访问地址]-->
    <vt:function var="newsurl" method="GetNewsUrl" type="VTemplate.WebTester.Core.NewsDbProvider" args="$#.news" />
    <li>
    <a href="{$:#.newsurl}" title="{$:#.news.title htmlencode='true'}">{$:#.news.title htmlencode='true'}...</a>
    </li>
    </vt:foreach>
</div>
<div class="side_block">
    <h3 class="title_yellow">热点新闻</h3>
    <ul class="topnews block_list bt">
    <vt:function var="#.newsdata" method="GetNewsData" type="$this" dbtype="hoting" />
    <vt:foreach from="$#.newsdata" item="news" index="i">
    <!--vt[调用自定义函数取得新闻的访问地址]-->
    <vt:function var="newsurl" method="GetNewsUrl" type="VTemplate.WebTester.Core.NewsDbProvider" args="$#.news" />
    <li>
    <a href="{$:#.newsurl}" title="{$:#.news.title htmlencode='true'}">{$:#.news.title htmlencode='true'}...</a>
    </li>
    </vt:foreach>
</div>
 <div class="side_block">
    <h3 class="title_blue">静态调用的相关新闻</h3>
    <ul class="topnews block_list bt">
    <vt:function var="#.newsdata" method="GetStaticNewsData" type="VTemplate.WebTester.currentrendertag_test,VTemplate.WebTester" dbtype="relating" />
    <vt:foreach from="$#.newsdata" item="news" index="i">
    <!--vt[调用自定义函数取得新闻的访问地址]-->
    <vt:function var="newsurl" method="GetNewsUrl" type="VTemplate.WebTester.Core.NewsDbProvider" args="$#.news" />
    <li>
    <a href="{$:#.newsurl}" title="{$:#.news.title htmlencode='true'}">{$:#.news.title htmlencode='true'}...</a>
    </li>
    </vt:foreach>
</div>
<div class="side_block">
    <h3 class="title_yellow">静态调用的热点新闻</h3>
    <ul class="topnews block_list bt">
    <vt:function var="#.newsdata" method="GetStaticNewsData" type="VTemplate.WebTester.currentrendertag_test,VTemplate.WebTester" dbtype="hoting" />
    <vt:foreach from="$#.newsdata" item="news" index="i">
    <!--vt[调用自定义函数取得新闻的访问地址]-->
    <vt:function var="newsurl" method="GetNewsUrl" type="VTemplate.WebTester.Core.NewsDbProvider" args="$#.news" />
    <li>
    <a href="{$:#.newsurl}" title="{$:#.news.title htmlencode='true'}">{$:#.news.title htmlencode='true'}...</a>
    </li>
    </vt:foreach>
</div>
</body>
</html>
